<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>用户列表</title>
    <link rel="icon" type="image/x-icon" href="/images/favicon.ico"/>
    <link rel="stylesheet" href="/css/bootstrap.min.css"/>
    <script src="/js/jquery.min.js"></script>
    <script src="/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container" style="padding: 0">
    <div class="navbar navbar-default">
        <a class="navbar-brand" href="/">首页</a>
        <ul class="nav navbar-nav">
            <li><a href="/user/userlist.html" th:href="@{/user/list}">用户列表</a></li>
        </ul>
        <ul class="nav navbar-nav navbar-right">
            <li><a href="#">个人中心</a></li>
            <li class="dropdown">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
                   aria-expanded="false">
                    <span th:text="${#httpServletRequest.remoteUser}"></span>
                    <span class="caret"></span></a>
                <ul class="dropdown-menu">
                    <li>
                        <form action="/logout" method="post">
                            <button type="submit">退出</button>
                        </form>
                    </li>
                </ul>
            </li>
        </ul>
    </div>
    <div class="row" style="margin: 0">
        <div class="panel panel-default">
            <div class="panel-heading">所有用户</div>
            <table class="table">
                <tr>
                    <td>序号</td>
                    <td>姓名</td>
                    <td>email</td>
                    <td>操作</td>
                </tr>
                <tr th:each="user,userStat:${users}">
                    <td th:text="${userStat.index+1}">1</td>
                    <td th:text="${user.name}">张三</td>
                    <td th:text="${user.email}">zhangsan@sinitek.com</td>
                    <td><a href="#">删除</a></td>
                </tr>
            </table>
        </div>
    </div>
</div>
</body>
</html>